package com.ruoyi.ae.api;

import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.gather.api.domain.dto.AutoQueryPriceTemplateInfoDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(contextId = "remoteAeActivityService", value = ServiceNameConstants.AE_SERVICE)
public interface RemoteAeActivityService {


    @PostMapping("/erp/promotionActivity/addProductToActivity")
    public R<Object> addProductToActivity(@RequestBody String productDtoStr);

    /**
     * 调用爬虫创建活动
     * @param templateInfo
     * @return
     */
    @PostMapping("/seller/sellerStorePromotionActivity/processingProjectGroupAndDiscount")
    R<Object> processingProjectGroupAndDiscount(@RequestBody AutoQueryPriceTemplateInfoDto templateInfo);

    @GetMapping("/erp/promotionActivity/selectStoreOngoingPromotions/{currentPage}/{storeId}")
    public R<Object> selectStoreOngoingPromotions(
            @PathVariable("currentPage") String currentPage,
            @PathVariable("storeId") String storeId
    );

    @GetMapping("/erp/promotionActivity/queryStoreOngoingPromotionsMsg/{storeUserName}")
    public R<Object> queryStoreOngoingPromotionsMsg(
            @PathVariable("storeUserName") String storeUserName
    );

}
